<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>emp-toolkit: /Users/wangxiao/git/emp-toolkit/emp-ot/ot/ot.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-full-doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">emp-toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('ot_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ot.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="ot_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef OT_H__</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define OT_H__</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="emp-tool_8h.html">emp-tool/emp-tool.h</a>&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00006"></a><span class="lineno"><a class="line" href="class_o_t.html">    6</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_o_t.html">OT</a> {</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="class_o_t.html#a3e2fa79624ad387e820e623dc1a300c4">    8</a></span>&#160;    <a class="code" href="class_o_t.html#a3e2fa79624ad387e820e623dc1a300c4">OT</a>(<a class="code" href="class_net_i_o.html">NetIO</a> * nio): <a class="code" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">io</a>(nio){};</div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">    9</a></span>&#160;    <a class="code" href="class_net_i_o.html">NetIO</a>* <a class="code" href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">io</a> = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="class_o_t.html#aa9aba495825edbd502486e829dc45726">   10</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_o_t.html#aa9aba495825edbd502486e829dc45726">send</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>* data0, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>* data1, <span class="keywordtype">int</span> length) {</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;        <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(<span class="keyword">this</span>)-&gt;send_impl(data0, data1, length);</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    }</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_o_t.html#a074dc3db3ef5325dcdd4c8b33f6e9d90">   13</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_o_t.html#a074dc3db3ef5325dcdd4c8b33f6e9d90">recv</a>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>* data, <span class="keyword">const</span> <span class="keywordtype">bool</span>* b, <span class="keywordtype">int</span> length) {</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;        <span class="keyword">static_cast&lt;</span>T*<span class="keyword">&gt;</span>(<span class="keyword">this</span>)-&gt;recv_impl(data, b, length);</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    }</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;};</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#endif// OT_H__</span></div><div class="ttc" id="garble_2block_8h_html_a65abbf31b0a30290189cdb5059b5f785"><div class="ttname"><a href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a></div><div class="ttdeci">__m128i block</div><div class="ttdef"><b>Definition:</b> block.h:8</div></div>
<div class="ttc" id="class_o_t_html_aa9aba495825edbd502486e829dc45726"><div class="ttname"><a href="class_o_t.html#aa9aba495825edbd502486e829dc45726">OT::send</a></div><div class="ttdeci">void send(const block *data0, const block *data1, int length)</div><div class="ttdef"><b>Definition:</b> ot.h:10</div></div>
<div class="ttc" id="class_net_i_o_html"><div class="ttname"><a href="class_net_i_o.html">NetIO</a></div><div class="ttdef"><b>Definition:</b> net_io_channel.h:22</div></div>
<div class="ttc" id="class_o_t_html_a66a5cf62a5b5707e2af40719b2005340"><div class="ttname"><a href="class_o_t.html#a66a5cf62a5b5707e2af40719b2005340">OT::io</a></div><div class="ttdeci">NetIO * io</div><div class="ttdef"><b>Definition:</b> ot.h:9</div></div>
<div class="ttc" id="class_o_t_html_a074dc3db3ef5325dcdd4c8b33f6e9d90"><div class="ttname"><a href="class_o_t.html#a074dc3db3ef5325dcdd4c8b33f6e9d90">OT::recv</a></div><div class="ttdeci">void recv(block *data, const bool *b, int length)</div><div class="ttdef"><b>Definition:</b> ot.h:13</div></div>
<div class="ttc" id="class_o_t_html"><div class="ttname"><a href="class_o_t.html">OT</a></div><div class="ttdef"><b>Definition:</b> ot.h:6</div></div>
<div class="ttc" id="emp-tool_8h_html"><div class="ttname"><a href="emp-tool_8h.html">emp-tool.h</a></div></div>
<div class="ttc" id="class_o_t_html_a3e2fa79624ad387e820e623dc1a300c4"><div class="ttname"><a href="class_o_t.html#a3e2fa79624ad387e820e623dc1a300c4">OT::OT</a></div><div class="ttdeci">OT(NetIO *nio)</div><div class="ttdef"><b>Definition:</b> ot.h:8</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_ac88365fe90bb4e9eec48638542d51c5.html">emp-ot</a></li><li class="navelem"><a class="el" href="dir_56b62f0454746633164d0b7ddf9c4cfd.html">ot</a></li><li class="navelem"><a class="el" href="ot_8h.html">ot.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
